var express = require('express');
var router = express.Router();
// var multiparty = require('multiparty')
var { UserModel } = require('../model/mongodb')

/* GET home page. */
// router.get('/', function(req, res, next) {
//   res.render('index', { title: 'Express' });
// });
router.get("/show", async (req, res) => {
  const data = await UserModel.find()
  res.send({
    code: 200,
    data
  })
})

module.exports = router;
